package com.woniuxy.controller;

import com.woniuxy.entity.dto.PickupOrderDTO;
import com.woniuxy.service.PickupOrderService;
import com.woniuxy.util.PageData;
import com.woniuxy.util.ResponseData;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/pickupOrder")
public class PickupOrderController {
    @Resource
    private PickupOrderService pickupOrderService;

    @PostMapping("/queryPickupOrder")
    public ResponseData<?> queryPickupOrder(@RequestBody PageData<PickupOrderDTO> pageData){
        return  pickupOrderService.queryPickupOrder(pageData);
    }

    @GetMapping( "/tiHuo/{id}")  //提货
    public ResponseData<?> tiHuo(@PathVariable("id") String id) {
        return pickupOrderService.tiHuo(id);
    }
    @GetMapping( "/arrival/{id}")  //到站
    public ResponseData<?> arrival(@PathVariable("id") String id) {
        return pickupOrderService.arrival(id);
    }

    @GetMapping( "/handleStart/{id}")  //发车
    public ResponseData<?> handleStart(@PathVariable("id") String id) {
        return pickupOrderService.handleStart(id);
    }

}
